package com.ssm.hj.controller;

import com.github.pagehelper.PageInfo;
import com.ssm.hj.page.Page;
import com.ssm.hj.search.PhysiqueSearch;
import com.ssm.hj.service.PhysiqueService;
import com.ssm.hj.view.MemberView;
import com.ssm.hj.view.MouldView;
import com.ssm.pojo.Member;
import com.ssm.pojo.Physique;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class PhysiqueController {
    @Resource
    private PhysiqueService physiqueService;

    @RequestMapping("/hj/queryPhysiqueAll")
    public PageInfo<Physique> queryPhysiqueAll(@RequestBody Page<PhysiqueSearch> page) throws Exception {
        return this.physiqueService.queryPhysiqueAllService(page);
    }
    @RequestMapping("/hj/queryBookingState")
    public MemberView queryBookingState(String card) throws Exception {
        return this.physiqueService.queryBookingStateService(card);
    }
    @RequestMapping("/hj/savePhysique")
    public int savePhysique(@RequestBody Physique physique) throws Exception {
        return this.physiqueService.savePhysiqueService(physique);
    }
}
